RenderUtil

object RenderUtil

Render utils for DrawContext to provide functionality similar to 1.20.2+ sprite rendering

Author

fzzyhmstrs

Since

0.2.0

Functions

Link copied to clipboard
fun DrawContext.drawGuiTexture(id: Identifier, x: Int, y: Int, width: Int, height: Int)

Extension function to replicate drawGuiTexture from 1.20.2+. Will brute force render the texture passed as a "standard" texture by adding the necessary identifier path information (such as the .png).

Link copied to clipboard
fun DrawContext.drawNineSlice(id: Identifier, x: Int, y: Int, width: Int, height: Int, outerWidth: Int, outerHeight: Int, textureWidth: Int, textureHeight: Int)

Extension function to replicate the nine-slice functionality drawGuiTexture from 1.20.2+. Will brute force render the texture passed as a "standard" texture by adding the necessary identifier path information (such as the .png).